package com.ruoyi.goods.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 销售数量对象 sales
 * 
 * @author ruoyi
 * @date 2025-01-06
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Sales extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 销售记录唯一标识符，自增 */
    @Excel(name = "销售记录唯一标识符，自增")
    @TableId(value = "id")
    private Long id;

    /** 关联的商品 ID */
    @Excel(name = "关联的商品 ID")
    private Long productId;

    /** 销售数量，必须大于等于0 */
    @Excel(name = "销售数量，必须大于等于0")
    private Long saleQuantity;
    private String productName;
    @TableField(value = "products")
    private Products products;
    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setProductId(Long productId) 
    {
        this.productId = productId;
    }

    public Long getProductId() 
    {
        return productId;
    }
    public void setSaleQuantity(Long saleQuantity) 
    {
        this.saleQuantity = saleQuantity;
    }

    public Long getSaleQuantity() 
    {
        return saleQuantity;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("productId", getProductId())
            .append("saleQuantity", getSaleQuantity())
            .toString();
    }
}
